package cn.xu.liteflow.script;

import cn.xu.liteflow.components.Order;
import com.yomahub.liteflow.script.ScriptExecuteWrap;
import com.yomahub.liteflow.script.body.JaninoCommonScriptBody;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;

public class S1 implements JaninoCommonScriptBody {
    @Override
    public Void body(final ScriptExecuteWrap wrap) {
        return CommonT.test(wrap, new Callable<Void>() {
            @Override
            public Void call() throws Exception {
                Order order = (Order)wrap.cmp.getContextBean(Order.class);
                System.out.println(order);
                Map<String, List<Serializable>> requestContextDataMap = (HashMap<String, List<Serializable>>)order.getRequestContextDataMap();
                List<Serializable> aaa = (List<Serializable>)requestContextDataMap.get("aaa");
                System.out.println(aaa);
                return null;
            }
        });
    }
}
